mod_rewrite + mod_headers :How to set Cache instructions for Rewritten .swf content only ?
am 11.12.2009 02:53:43 von ABAPGUY
--0-546438894-1260496423=:53226
Content-Type: text/plain; charset=us-ascii
Hi Apache Experts,
I wish to set 2 Cache statements for .swf files (only) . I am rewriting using mod_rewrite and have enabled mod_headers .
My 1st attempt did not work :
RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
Header set Cache-Control "must-revalidate, proxy-revalidate"
Header set Pragma "public"
RewriteRule ^//(.*)\.swf https:////$1.swf [P,NC,L]
It seems RewriteCond is applied to the next Rewrite rule ..but the Headers are set for all subsequent Rewrite rules ..not what I wanted .
Is this the wrong way to do it ? How do I set the Headers for .swf files only ?
Regards
Daniel
--0-546438894-1260496423=:53226
Content-Type: text/html; charset=us-ascii
Hi Apache Experts,
I wish to set 2 Cache statements for .swf files (only) . I am rewriting using mod_rewrite and have enabled mod_headers .
My 1st attempt did not work :
RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
Header set Cache-Control "must-revalidate, proxy-revalidate"
Header set Pragma "public"
RewriteRule ^/<flash_dir>/(.*)\.swf https://<servername>/<flash_dir>/$1.swf [P,NC,L]
It seems RewriteCond is applied to the next Rewrite rule ..but the Headers are set for all subsequent Rewrite rules ..not what I wanted .
Is this the wrong way to do it ? How do I set the Headers for .swf f
iles only ?
Regards
Daniel
--0-546438894-1260496423=:53226--
Re: mod_rewrite + mod_headers :How to set Cache
am 11.12.2009 03:25:08 von Igor Cicimov
--00504502c9fdf14388047a6aa123
Content-Type: text/plain; charset=ISO-8859-1
Header set Cache-Control "must-revalidate, proxy-revalidate"
Header set Pragma "public"
or use mod_headers commands per content (read the mod_headers instructions
on apache.org)
On Fri, Dec 11, 2009 at 12:53 PM, ABAPGUY wrote:
> Hi Apache Experts,
> I wish to set 2 Cache statements for .swf files (only) . I am rewriting
> using mod_rewrite and have enabled mod_headers .
> My 1st attempt did not work :
>
> RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
> Header set Cache-Control "must-revalidate, proxy-revalidate"
> Header set Pragma "public"
> RewriteRule ^//(.*)\.swf https:////$1.swf
> [P,NC,L]
>
> It seems RewriteCond is applied to the next Rewrite rule ..but the Headers
> are set for all subsequent Rewrite rules ..not what I wanted .
> Is this the wrong way to do it ? How do I set the Headers for .swf files
> only ?
>
> Regards
> Daniel
>
>
--00504502c9fdf14388047a6aa123
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<FilesMatch "\.(swf)$">
Header set Cache-Co=
ntrol "must-revalidate, proxy-revalidate"
Header set Pragma &q=
uot;public"
</FilesMatch>
or use mod_head=
ers commands per content (read the mod_headers instructions on
ttp://apache.org">apache.org)
On Fri, Dec 11, 2009 at 12:53 PM, AB=
APGUY
<abapguy@ya=
hoo.com> wrote:
"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padd=
ing-left: 1ex;">
;">
Hi Apache Experts,
I wish to set 2 Cache statements for .swf fil=
es (only) . I am rewriting using mod_rewrite and have enabled mod_headers .=
My 1st attempt did not work=A0 :
RewriteCond %{REQUEST_URI} \.(swf)$=
[NC]
Header set Cache-Control "must-revalidate, proxy-revalidate&q=
uot;
Header set Pragma "public"
RewriteRule ^/<flash_dir=
>/(.*)\.swf https://<servername>/<flash_dir>/$1.swf [P,NC,L]=
It seems RewriteCond is applied to the next Rewrite rule ..but the Head=
ers are set for all subsequent Rewrite rules ..not what I wanted .
Is th=
is the wrong way to do it ? How do I set the Headers for .swf files only ?<=
br>
Regards
Daniel
--00504502c9fdf14388047a6aa123--